import { Button, ErrorBlock, Space } from 'antd-mobile';
import { useHistory } from 'react-router-dom';

export default function NotFound() {
  const history = useHistory();
  return (
    <div>
      <ErrorBlock
        title="你要访问的页面不见了"
        description="换个页面试试..."
        fullPage
        status="empty"
      >
        <Space>
          <Button color="primary" onClick={() => history.push('/layout')}>
            回到首页
          </Button>
          <Button color="primary" onClick={() => history.goBack()}>
            后退
          </Button>
        </Space>
      </ErrorBlock>
    </div>
  );
}
